/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.sql.Blob;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 说明：
 * Entity Name 商品图片
 * @Author：黄盛强
 * @Date：2012-04-11
 */
@Entity
@Table(name="ruipeng_tb_tcommodityPicture")
public class TCommodityPicture implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String id;//明细编号CHAR(15)
	
	private Blob Picture;//相片
	
	private TCommodity TCommodity;//商品
	
	public TCommodityPicture() {}
	
	public TCommodityPicture(String id) {
		this.id = id;
	}
	
	public TCommodityPicture(String id, TCommodity TCommodity) {
		this.id = id;
		this.TCommodity = TCommodity;
	}
	
	public TCommodityPicture(String id, Blob Picture,
			com.ruipengkj.bean.TCommodity tCommodity) {
		this.id = id;
		this.Picture = Picture;
		TCommodity = tCommodity;
	}

	@Id
	@Column(name = "id",length=15)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "Picture",length=15)
	public Blob getPicture() {
		return Picture;
	}

	public void setPicture(Blob Picture) {
		this.Picture = Picture;
	}
	
	@ManyToOne
	@JoinColumn(name="CommodityID")
	public TCommodity getTCommodity() {
		return TCommodity;
	}

	public void setTCommodity(TCommodity tCommodity) {
		TCommodity = tCommodity;
	}
}
